.class public Llt/noframe/gpsfarmguide/utils/Drawing;
.super Ljava/lang/Object;
.source "Drawing.java"


# direct methods
.method public constructor <init>()V
    .locals 0

    .line 24
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public static addMarker(Lcom/google/android/gms/maps/model/LatLng;)Lcom/google/android/gms/maps/model/Marker;
    .locals 2

    .line 104
    new-instance v0, Lcom/google/android/gms/maps/model/MarkerOptions;

    invoke-direct {v0}, Lcom/google/android/gms/maps/model/MarkerOptions;-><init>()V

    const/4 v1, 0x0

    .line 105
    invoke-virtual {v0, v1}, Lcom/google/android/gms/maps/model/MarkerOptions;->draggable(Z)Lcom/google/android/gms/maps/model/MarkerOptions;

    .line 106
    invoke-virtual {v0, p0}, Lcom/google/android/gms/maps/model/MarkerOptions;->position(Lcom/google/android/gms/maps/model/LatLng;)Lcom/google/android/gms/maps/model/MarkerOptions;

    const-string p0, "marker"

    .line 107
    invoke-virtual {v0, p0}, Lcom/google/android/gms/maps/model/MarkerOptions;->snippet(Ljava/lang/String;)Lcom/google/android/gms/maps/model/MarkerOptions;

    const p0, 0x7f080124

    .line 108
    invoke-static {p0}, Lcom/google/android/gms/maps/model/BitmapDescriptorFactory;->fromResource(I)Lcom/google/android/gms/maps/model/BitmapDescriptor;

    move-result-object p0

    invoke-virtual {v0, p0}, Lcom/google/android/gms/maps/model/MarkerOptions;->icon(Lcom/google/android/gms/maps/model/BitmapDescriptor;)Lcom/google/android/gms/maps/model/MarkerOptions;

    const/high16 p0, 0x3f000000    # 0.5f

    .line 109
    invoke-virtual {v0, p0, p0}, Lcom/google/android/gms/maps/model/MarkerOptions;->anchor(FF)Lcom/google/android/gms/maps/model/MarkerOptions;

    .line 111
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object p0

    invoke-virtual {p0}, Llt/noframe/gpsfarmguide/Data;->getMap()Lcom/google/android/gms/maps/GoogleMap;

    move-result-object p0

    invoke-virtual {p0, v0}, Lcom/google/android/gms/maps/GoogleMap;->addMarker(Lcom/google/android/gms/maps/model/MarkerOptions;)Lcom/google/android/gms/maps/model/Marker;

    move-result-object p0

    return-object p0
.end method

.method public static addMarkers(Ljava/util/List;Z)Ljava/util/List;
    .locals 4
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List<",
            "Lcom/google/android/gms/maps/model/LatLng;",
            ">;Z)",
            "Ljava/util/List<",
            "Lcom/google/android/gms/maps/model/Marker;",
            ">;"
        }
    .end annotation

    .line 167
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    const/4 v1, 0x0

    .line 168
    :goto_0
    invoke-interface {p0}, Ljava/util/List;->size()I

    move-result v2

    if-ge v1, v2, :cond_2

    if-eqz p1, :cond_1

    .line 169
    rem-int/lit8 v2, v1, 0x2

    if-eqz v2, :cond_1

    invoke-interface {p0}, Ljava/util/List;->size()I

    move-result v2

    const/4 v3, 0x2

    if-ne v2, v3, :cond_0

    goto :goto_1

    .line 172
    :cond_0
    invoke-interface {p0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/google/android/gms/maps/model/LatLng;

    invoke-static {v2}, Llt/noframe/gpsfarmguide/utils/Drawing;->addMidMarker(Lcom/google/android/gms/maps/model/LatLng;)Lcom/google/android/gms/maps/model/Marker;

    move-result-object v2

    invoke-interface {v0, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    goto :goto_2

    .line 170
    :cond_1
    :goto_1
    invoke-interface {p0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/google/android/gms/maps/model/LatLng;

    invoke-static {v2}, Llt/noframe/gpsfarmguide/utils/Drawing;->addMarker(Lcom/google/android/gms/maps/model/LatLng;)Lcom/google/android/gms/maps/model/Marker;

    move-result-object v2

    invoke-interface {v0, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    :goto_2
    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    :cond_2
    return-object v0
.end method

.method public static addMidMarker(Lcom/google/android/gms/maps/model/LatLng;)Lcom/google/android/gms/maps/model/Marker;
    .locals 2

    .line 121
    new-instance v0, Lcom/google/android/gms/maps/model/MarkerOptions;

    invoke-direct {v0}, Lcom/google/android/gms/maps/model/MarkerOptions;-><init>()V

    const/4 v1, 0x0

    .line 122
    invoke-virtual {v0, v1}, Lcom/google/android/gms/maps/model/MarkerOptions;->draggable(Z)Lcom/google/android/gms/maps/model/MarkerOptions;

    .line 123
    invoke-virtual {v0, p0}, Lcom/google/android/gms/maps/model/MarkerOptions;->position(Lcom/google/android/gms/maps/model/LatLng;)Lcom/google/android/gms/maps/model/MarkerOptions;

    const-string p0, "marker_mid"

    .line 124
    invoke-virtual {v0, p0}, Lcom/google/android/gms/maps/model/MarkerOptions;->snippet(Ljava/lang/String;)Lcom/google/android/gms/maps/model/MarkerOptions;

    const p0, 0x7f080125

    .line 125
    invoke-static {p0}, Lcom/google/android/gms/maps/model/BitmapDescriptorFactory;->fromResource(I)Lcom/google/android/gms/maps/model/BitmapDescriptor;

    move-result-object p0

    invoke-virtual {v0, p0}, Lcom/google/android/gms/maps/model/MarkerOptions;->icon(Lcom/google/android/gms/maps/model/BitmapDescriptor;)Lcom/google/android/gms/maps/model/MarkerOptions;

    const/high16 p0, 0x3f000000    # 0.5f

    .line 126
    invoke-virtual {v0, p0, p0}, Lcom/google/android/gms/maps/model/MarkerOptions;->anchor(FF)Lcom/google/android/gms/maps/model/MarkerOptions;

    .line 128
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object p0

    invoke-virtual {p0}, Llt/noframe/gpsfarmguide/Data;->getMap()Lcom/google/android/gms/maps/GoogleMap;

    move-result-object p0

    invoke-virtual {p0, v0}, Lcom/google/android/gms/maps/GoogleMap;->addMarker(Lcom/google/android/gms/maps/model/MarkerOptions;)Lcom/google/android/gms/maps/model/Marker;

    move-result-object p0

    return-object p0
.end method

.method public static deselectMarker()V
    .locals 3

    .line 145
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getSelectedMarker()Lcom/google/android/gms/maps/model/Marker;

    move-result-object v0

    if-eqz v0, :cond_2

    .line 146
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getSelectedMarker()Lcom/google/android/gms/maps/model/Marker;

    move-result-object v0

    .line 148
    invoke-virtual {v0}, Lcom/google/android/gms/maps/model/Marker;->getSnippet()Ljava/lang/String;

    move-result-object v1

    const-string v2, "marker"

    invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_0

    const v1, 0x7f080124

    .line 149
    invoke-static {v1}, Lcom/google/android/gms/maps/model/BitmapDescriptorFactory;->fromResource(I)Lcom/google/android/gms/maps/model/BitmapDescriptor;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/google/android/gms/maps/model/Marker;->setIcon(Lcom/google/android/gms/maps/model/BitmapDescriptor;)V

    goto :goto_0

    .line 150
    :cond_0
    invoke-virtual {v0}, Lcom/google/android/gms/maps/model/Marker;->getSnippet()Ljava/lang/String;

    move-result-object v1

    const-string v2, "marker_mid"

    invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_1

    const v1, 0x7f080125

    .line 151
    invoke-static {v1}, Lcom/google/android/gms/maps/model/BitmapDescriptorFactory;->fromResource(I)Lcom/google/android/gms/maps/model/BitmapDescriptor;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/google/android/gms/maps/model/Marker;->setIcon(Lcom/google/android/gms/maps/model/BitmapDescriptor;)V

    .line 152
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v1

    invoke-virtual {v1}, Llt/noframe/gpsfarmguide/Data;->getAddDeleteState()Llt/noframe/gpsfarmguide/states/add_delete_states/AddDeleteStatesController;

    move-result-object v1

    new-instance v2, Llt/noframe/gpsfarmguide/states/add_delete_states/DeleteState;

    invoke-direct {v2}, Llt/noframe/gpsfarmguide/states/add_delete_states/DeleteState;-><init>()V

    invoke-virtual {v1, v2}, Llt/noframe/gpsfarmguide/states/add_delete_states/AddDeleteStatesController;->setState(Llt/noframe/gpsfarmguide/states/add_delete_states/AddDeleteState;)V

    :cond_1
    :goto_0
    const/high16 v1, 0x3f000000    # 0.5f

    .line 154
    invoke-virtual {v0, v1, v1}, Lcom/google/android/gms/maps/model/Marker;->setAnchor(FF)V

    .line 155
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v0

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Llt/noframe/gpsfarmguide/Data;->setSelectedMarker(Lcom/google/android/gms/maps/model/Marker;)V

    :cond_2
    return-void
.end method

.method public static drawPolygon(Ljava/util/List;)Lcom/google/android/gms/maps/model/Polygon;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List<",
            "Lcom/google/android/gms/maps/model/LatLng;",
            ">;)",
            "Lcom/google/android/gms/maps/model/Polygon;"
        }
    .end annotation

    .line 46
    new-instance v0, Lcom/google/android/gms/maps/model/PolygonOptions;

    invoke-direct {v0}, Lcom/google/android/gms/maps/model/PolygonOptions;-><init>()V

    .line 47
    invoke-virtual {v0, p0}, Lcom/google/android/gms/maps/model/PolygonOptions;->addAll(Ljava/lang/Iterable;)Lcom/google/android/gms/maps/model/PolygonOptions;

    const p0, 0x3f00ff00

    .line 48
    invoke-virtual {v0, p0}, Lcom/google/android/gms/maps/model/PolygonOptions;->fillColor(I)Lcom/google/android/gms/maps/model/PolygonOptions;

    const/high16 p0, -0x10000

    .line 49
    invoke-virtual {v0, p0}, Lcom/google/android/gms/maps/model/PolygonOptions;->strokeColor(I)Lcom/google/android/gms/maps/model/PolygonOptions;

    const/high16 p0, 0x3f800000    # 1.0f

    .line 50
    invoke-virtual {v0, p0}, Lcom/google/android/gms/maps/model/PolygonOptions;->strokeWidth(F)Lcom/google/android/gms/maps/model/PolygonOptions;

    .line 55
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object p0

    invoke-virtual {p0}, Llt/noframe/gpsfarmguide/Data;->getMap()Lcom/google/android/gms/maps/GoogleMap;

    move-result-object p0

    invoke-virtual {p0, v0}, Lcom/google/android/gms/maps/GoogleMap;->addPolygon(Lcom/google/android/gms/maps/model/PolygonOptions;)Lcom/google/android/gms/maps/model/Polygon;

    move-result-object p0

    return-object p0
.end method

.method public static drawPolygon(Ljava/util/List;I)Lcom/google/android/gms/maps/model/Polygon;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List<",
            "Lcom/google/android/gms/maps/model/LatLng;",
            ">;I)",
            "Lcom/google/android/gms/maps/model/Polygon;"
        }
    .end annotation

    .line 65
    new-instance v0, Lcom/google/android/gms/maps/model/PolygonOptions;

    invoke-direct {v0}, Lcom/google/android/gms/maps/model/PolygonOptions;-><init>()V

    .line 66
    invoke-virtual {v0, p0}, Lcom/google/android/gms/maps/model/PolygonOptions;->addAll(Ljava/lang/Iterable;)Lcom/google/android/gms/maps/model/PolygonOptions;

    .line 67
    invoke-virtual {v0, p1}, Lcom/google/android/gms/maps/model/PolygonOptions;->fillColor(I)Lcom/google/android/gms/maps/model/PolygonOptions;

    const/high16 p0, -0x10000

    .line 68
    invoke-virtual {v0, p0}, Lcom/google/android/gms/maps/model/PolygonOptions;->strokeColor(I)Lcom/google/android/gms/maps/model/PolygonOptions;

    const/high16 p0, 0x3f800000    # 1.0f

    .line 69
    invoke-virtual {v0, p0}, Lcom/google/android/gms/maps/model/PolygonOptions;->strokeWidth(F)Lcom/google/android/gms/maps/model/PolygonOptions;

    .line 71
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object p0

    invoke-virtual {p0}, Llt/noframe/gpsfarmguide/Data;->getMap()Lcom/google/android/gms/maps/GoogleMap;

    move-result-object p0

    invoke-virtual {p0, v0}, Lcom/google/android/gms/maps/GoogleMap;->addPolygon(Lcom/google/android/gms/maps/model/PolygonOptions;)Lcom/google/android/gms/maps/model/Polygon;

    move-result-object p0

    return-object p0
.end method

.method public static drawPolyline(Ljava/util/List;)Lcom/google/android/gms/maps/model/Polyline;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List<",
            "Lcom/google/android/gms/maps/model/LatLng;",
            ">;)",
            "Lcom/google/android/gms/maps/model/Polyline;"
        }
    .end annotation

    .line 32
    new-instance v0, Lcom/google/android/gms/maps/model/PolylineOptions;

    invoke-direct {v0}, Lcom/google/android/gms/maps/model/PolylineOptions;-><init>()V

    .line 33
    invoke-virtual {v0, p0}, Lcom/google/android/gms/maps/model/PolylineOptions;->addAll(Ljava/lang/Iterable;)Lcom/google/android/gms/maps/model/PolylineOptions;

    const/high16 p0, -0x10000

    .line 34
    invoke-virtual {v0, p0}, Lcom/google/android/gms/maps/model/PolylineOptions;->color(I)Lcom/google/android/gms/maps/model/PolylineOptions;

    const/high16 p0, 0x40400000    # 3.0f

    .line 35
    invoke-virtual {v0, p0}, Lcom/google/android/gms/maps/model/PolylineOptions;->width(F)Lcom/google/android/gms/maps/model/PolylineOptions;

    .line 37
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object p0

    invoke-virtual {p0}, Llt/noframe/gpsfarmguide/Data;->getMap()Lcom/google/android/gms/maps/GoogleMap;

    move-result-object p0

    invoke-virtual {p0, v0}, Lcom/google/android/gms/maps/GoogleMap;->addPolyline(Lcom/google/android/gms/maps/model/PolylineOptions;)Lcom/google/android/gms/maps/model/Polyline;

    move-result-object p0

    return-object p0
.end method

.method public static getPolygonOptions(Ljava/util/List;)Lcom/google/android/gms/maps/model/PolygonOptions;
    .locals 7
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List<",
            "Llt/farmis/libraries/shape_import_android/intefaces/LatLngInterface;",
            ">;)",
            "Lcom/google/android/gms/maps/model/PolygonOptions;"
        }
    .end annotation

    .line 178
    new-instance v0, Lcom/google/android/gms/maps/model/PolygonOptions;

    invoke-direct {v0}, Lcom/google/android/gms/maps/model/PolygonOptions;-><init>()V

    const v1, 0x3f00ff00

    .line 179
    invoke-virtual {v0, v1}, Lcom/google/android/gms/maps/model/PolygonOptions;->fillColor(I)Lcom/google/android/gms/maps/model/PolygonOptions;

    const/high16 v1, 0x3f800000    # 1.0f

    .line 180
    invoke-virtual {v0, v1}, Lcom/google/android/gms/maps/model/PolygonOptions;->strokeWidth(F)Lcom/google/android/gms/maps/model/PolygonOptions;

    const/high16 v1, -0x10000

    .line 181
    invoke-virtual {v0, v1}, Lcom/google/android/gms/maps/model/PolygonOptions;->strokeColor(I)Lcom/google/android/gms/maps/model/PolygonOptions;

    .line 183
    invoke-interface {p0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object p0

    :goto_0
    invoke-interface {p0}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_0

    invoke-interface {p0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Llt/farmis/libraries/shape_import_android/intefaces/LatLngInterface;

    .line 184
    new-instance v2, Lcom/google/android/gms/maps/model/LatLng;

    invoke-interface {v1}, Llt/farmis/libraries/shape_import_android/intefaces/LatLngInterface;->getLatitude()D

    move-result-wide v3

    invoke-interface {v1}, Llt/farmis/libraries/shape_import_android/intefaces/LatLngInterface;->getLongitude()D

    move-result-wide v5

    invoke-direct {v2, v3, v4, v5, v6}, Lcom/google/android/gms/maps/model/LatLng;-><init>(DD)V

    invoke-virtual {v0, v2}, Lcom/google/android/gms/maps/model/PolygonOptions;->add(Lcom/google/android/gms/maps/model/LatLng;)Lcom/google/android/gms/maps/model/PolygonOptions;

    goto :goto_0

    :cond_0
    return-object v0
.end method

.method public static selectMarker(Lcom/google/android/gms/maps/model/Marker;)V
    .locals 2

    const v0, 0x7f080126

    .line 136
    invoke-static {v0}, Lcom/google/android/gms/maps/model/BitmapDescriptorFactory;->fromResource(I)Lcom/google/android/gms/maps/model/BitmapDescriptor;

    move-result-object v0

    invoke-virtual {p0, v0}, Lcom/google/android/gms/maps/model/Marker;->setIcon(Lcom/google/android/gms/maps/model/BitmapDescriptor;)V

    const/high16 v0, 0x3f000000    # 0.5f

    const/4 v1, 0x0

    .line 137
    invoke-virtual {p0, v0, v1}, Lcom/google/android/gms/maps/model/Marker;->setAnchor(FF)V

    .line 138
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v0

    invoke-virtual {v0, p0}, Llt/noframe/gpsfarmguide/Data;->setSelectedMarker(Lcom/google/android/gms/maps/model/Marker;)V

    return-void
.end method


# virtual methods
.method public loadField(Ljava/util/List;)Lcom/google/android/gms/maps/model/PolygonOptions;
    .locals 2
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List<",
            "Lcom/google/android/gms/maps/model/LatLng;",
            ">;)",
            "Lcom/google/android/gms/maps/model/PolygonOptions;"
        }
    .end annotation

    .line 90
    new-instance v0, Lcom/google/android/gms/maps/model/PolygonOptions;

    invoke-direct {v0}, Lcom/google/android/gms/maps/model/PolygonOptions;-><init>()V

    const v1, 0x3f00ff00

    .line 91
    invoke-virtual {v0, v1}, Lcom/google/android/gms/maps/model/PolygonOptions;->fillColor(I)Lcom/google/android/gms/maps/model/PolygonOptions;

    const/high16 v1, -0x10000

    .line 92
    invoke-virtual {v0, v1}, Lcom/google/android/gms/maps/model/PolygonOptions;->strokeColor(I)Lcom/google/android/gms/maps/model/PolygonOptions;

    const/high16 v1, 0x3f800000    # 1.0f

    .line 93
    invoke-virtual {v0, v1}, Lcom/google/android/gms/maps/model/PolygonOptions;->strokeWidth(F)Lcom/google/android/gms/maps/model/PolygonOptions;

    .line 94
    invoke-virtual {v0, p1}, Lcom/google/android/gms/maps/model/PolygonOptions;->addAll(Ljava/lang/Iterable;)Lcom/google/android/gms/maps/model/PolygonOptions;

    return-object v0
.end method
